/* eslint valid-jsdoc: "off" */

'use strict';
require('egg-apollojs').apollo.setEnv();
// console.log(apollo)
/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {
    // test1: process.env.redis,
    mongoose: {
      url: 'mongodb://127.0.0.1/threea', //你的数据库地址，不要端口
      options: {
        useNewUrlParser: true
      }
    },
    redis: {
      client: {
        port: 19000,
        host: process.env.redis,
        password: null, 
        db: 3
      }
    }
  };

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1558493515239_6184';

  // add your middleware config here
  config.middleware = [];

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  return {
    ...config,
    ...userConfig,
  };
};